# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Contributor: Elvis Angelaccio <elvis.angelaccio@kde.org>

pkgname=hashcat-utils
pkgver=1.9
pkgrel=2
pkgdesc='Set of small utilities that are useful in advanced password cracking'
url='https://github.com/hashcat/hashcat-utils'
arch=('loong64' 'x86_64')
license=('MIT')
depends=('perl')
source=(${pkgname}-${pkgver}.tar.gz::https://github.com/hashcat/${pkgname}/archive/v${pkgver}.tar.gz)
sha256sums=('9ddda7f9dfeebfde95b2e980241730262a7f512ceb37941c38b590721d6b6921')
sha512sums=('5f8cef312496e13d1152742950397933e9d5866740afe377321fb48386174b64d96f90d3072febfb97bf0f7eb438f41d6b5e14bfc3e157c9c3e664ffbc5b614b')

build() {
  cd ${pkgname}-${pkgver}
  make -C src
}

package() {
  cd ${pkgname}-${pkgver}
  for bin in src/*.bin; do
      install -Dm 755 ${bin} "${pkgdir}/usr/bin/$(basename ${bin} .bin)"
  done
  for script in src/*.pl; do
      install -Dm 755 ${script} "${pkgdir}/usr/bin/$(basename ${script} .pl)"
  done
  install -Dm 644 README.md CHANGES -t "${pkgdir}/usr/share/doc/${pkgname}"
  install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
}

# vim: ts=2 sw=2 et:
